package concurrent;

/**
 * 设置和检测线程是否中断
 */
public class InterruptTest {
    public static void main(String[] args) {
        Thread mainThread = Thread.currentThread();
        mainThread.interrupt();
        System.out.println(mainThread.isInterrupted());
        System.out.println(mainThread.isInterrupted());
    }
}
